package com.lin.controller;

import com.lin.pojo.MApply;
import com.lin.pojo.PageVo;
import com.lin.service.PsmanageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@RestController
public class PsmanageRestFulController {

    @Autowired
    PsmanageService psmanageService;

    @GetMapping("/psmanage.action")
    public PageVo<MApply> queryMApplybycond(MApply mApply,
                                                @RequestParam(value = "pageno",defaultValue = "1") Integer pageno,
                                                @RequestParam(value = "pagesize",defaultValue = "5")Integer pagesize){
        return psmanageService.queryMApplybycond(mApply, pageno,pagesize);
    }
    @GetMapping("/psmanage.action/{applyId}")
    public MApply queryMApplyByName( MApply mApply){
        return psmanageService.queryMApplyByName(mApply);
    }
    @PutMapping("/pasmanage.action/{applyId}")
    public int updateMApplyByCheckTag(@PathVariable String applyId){
        return psmanageService.updateMApplyByCheckTag(applyId);
    }
}
